<template>
  <div class="container_box">
    <HeaderBox></HeaderBox>
    <div class="main_box warpper_box">
      <div class="tip">旅游快讯</div>
      <div class="detail-title">{{details.title}}</div>
      <div class="detail-date">更新时间:{{details.createTime}}</div>
      <div class="details_main" v-html="details.context">
        
      </div>
    </div>
  </div>
</template>
<script>
import { post } from "@/plugins/api";
export default {
  props: {},
  components: {},
  data() {
    return {
      details_id: "",
      details:{}
    };
  },
  methods: {
    get_details() {
      post("/strategy/query_article", { id: this.details_id }).then(res => {
        // console.log(res);
        this.details = res.data[0]
      });
    }
  },
  mounted() {
    let { id } = this.$route.query;
    this.details_id = id;
    this.get_details()
  }
};
</script>
<style lang="scss" scoped>
.main_box {
  border: 1px solid #ddd;
  padding: 10px 15px;
  margin-top: 10px;
  .tip {
    width: 90px;
    padding-left: 10px;
    margin: 10px 0;
    color: #fff;
    background-color: #ccc;
    background: url("https://picbed.qunarzz.com/94f80fe663adf657d77e98bdfd48fdb8.png")
      no-repeat center;
    background-size: cover;
    height: 25px;
  }
  .detail-title {
    margin-top: 10px;

    font-size: 24px;
  }
  .detail-date {
    margin-bottom: 10px;
    color: #ccc;
    padding-left: 20px;
  }
  .details_main {
    font-size: 18px;
  }
}
</style>
